﻿using CollectionsJoin;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Collections.Generic;

namespace Join.Test
{
    [TestClass()]
    public class CollectionsJoinTest
    {
        [TestMethod()]
        public void IntJoinTest()
        {
            ICollection<int> collection = new List<int>() { 1, 2, 3, 4 };
            string expected = "[1,2,3,4]";
            string actual;
            actual = collection.Join<int>();
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void StringJoinTest()
        {
            ICollection<string> collection = new List<string>() { "as","d","bgf","ge","lep" };
            string expected = "[as,d,bgf,ge,lep]";
            string actual;
            actual = collection.Join<string>();
            Assert.AreEqual(expected, actual);
        }
    }
}
